/*  1:   */ package org.jetbrains.jps.model.impl;
/*  2:   */ 
/*  3:   */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.jps.model.JpsCompositeElement;
import org.jetbrains.jps.model.JpsElementCollection;
import org.jetbrains.jps.model.JpsElementReference;
import org.jetbrains.jps.model.JpsNamedElement;
import org.jetbrains.jps.model.ex.JpsElementCollectionRole;

/*  4:   */
/*  5:   */
/*  6:   */
/*  7:   */
/*  8:   */
/*  9:   */
/* 10:   */
/* 11:   */ 
/* 12:   */ public abstract class JpsNamedElementReferenceImpl<T extends JpsNamedElement, Self extends JpsNamedElementReferenceImpl<T, Self>>
/* 13:   */   extends JpsNamedElementReferenceBase<T, T, Self>
/* 14:   */ {
/* 15:   */   protected final JpsElementCollectionRole<? extends T> myCollectionRole;
/* 16:   */   
/* 17:   */   protected JpsNamedElementReferenceImpl(@NotNull JpsElementCollectionRole<? extends T> paramJpsElementCollectionRole, @NotNull String paramString, @NotNull JpsElementReference<? extends JpsCompositeElement> paramJpsElementReference)
/* 18:   */   {
/* 19:34 */     super(paramString, paramJpsElementReference);
/* 20:35 */     this.myCollectionRole = paramJpsElementCollectionRole;
/* 21:   */   }
/* 22:   */   
/* 23:   */   protected JpsNamedElementReferenceImpl(JpsNamedElementReferenceImpl<T, Self> paramJpsNamedElementReferenceImpl)
/* 24:   */   {
/* 25:39 */     super(paramJpsNamedElementReferenceImpl);
/* 26:40 */     this.myCollectionRole = paramJpsNamedElementReferenceImpl.myCollectionRole;
/* 27:   */   }
/* 28:   */   
/* 29:   */   protected T resolve(T paramT)
/* 30:   */   {
/* 31:45 */     return paramT;
/* 32:   */   }
/* 33:   */   
/* 34:   */   @Nullable
/* 35:   */   protected JpsElementCollection<? extends T> getCollection(@NotNull JpsCompositeElement paramJpsCompositeElement)
/* 36:   */   {
/* 37:50 */     if (paramJpsCompositeElement == null) {
/* 38:50 */       throw new IllegalArgumentException(String.format("Argument %s for @NotNull parameter of %s.%s must not be null", new Object[] { "0", "org/jetbrains/jps/model/impl/JpsNamedElementReferenceImpl", "getCollection" }));
/* 39:   */     }
/* 40:50 */     return (JpsElementCollection)paramJpsCompositeElement.getContainer().getChild(this.myCollectionRole);
/* 41:   */   }
/* 42:   */ }



/* Location:           E:\idea\

 * Qualified Name:     org.jetbrains.jps.model.impl.JpsNamedElementReferenceImpl

 * JD-Core Version:    0.7.0.1

 */